<%--
  Created by IntelliJ IDEA.
  User: 777
  Date: 2021/6/30
  Time: 14:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>题库-个人中心-赛事星</title>
    <script type="text/javascript" src="/Eventstar/js/jquery-1.10.2.js" ></script>
    <link href="/Eventstar/css/book.css" rel="stylesheet" type="text/css">
</head>
<script>
    $(function (){
        $("#new1").css("display","none");

       $.ajax({
            url:"http://localhost:9090/Eventstar/book/find",
            type:"post",
            success:function(result){
                console.log(result);
                for(var i=0;i<result.length;i++) {
                    $(".books").append("<a href='/Eventstar/book/book_in?bookname="+result[i].bookname+"'><div class='book'><span class='bookname'>" + result[i].bookname + "</span></div></a>");
                }
            }

        });


        $(".books").delegate(".book","mouseover",function(){
            $(this).css("border","1px solid black");
        });
        $(".books").delegate(".book","mouseout",function(){
            $(this).css("border","1px solid burlywood");
        });

        $("#addbook").click(function (){
            $("#new1").css("display","block");
            $("#d2").css("display","none");
        })

        $("#close").click(function (){
            $("#new1").css("display","none");
            $("#d2").css("display","block");
        })

    });

</script>
<body>
<img src="/Eventstar/img/book_head.jpg">
<div id="max">
    <div id="d1">
        <ul class="body-left">
            <li>
                <img src="/Eventstar/img/book_tx2.png" class="tx2">
                <div class="content">个人主页</div>
            </li>
            <br />
            <div class="xian">———————————</div>
            <li><a class="C001">我是考生</a></li> <br />
            <li><a class="font1"  href="#"> 竞赛</a></li> <br />
            <li><a class="font1" href="#">考试</a></li> <br />
            <li><a class="font1"  href="#">答题</a></li> <br />
            <div class="xian">———————————</div>
            <li><a class="C001">我是考官</a></li> <br />
            <li><a class="font1" href="/Eventstar/set/getsj">出试卷</a></li> <br />
            <li><a class="font1"  href="/Eventstar/work.jsp">作业情况</a></li> <br />
            <div class="xian">———————————</div>
            <li><a class="C001">我的资料库</a></li> <br />
            <li><a class="font1"  href="/Eventstar/book_lwj/book.jsp" class="selected">题库</a></li> <br />
            <li><a class="C001" href="#">设置</a></li> <br />
            <li><a class="C001" href="#">消息</a></li> <br />

        </ul>
    </div>
    <div id="d2">
        <h3 style="margin-left: 30px">题库</h3>
            <div class="books">
                 <div id="addbook"></div>
            </div>
    </div>
    <div id="new1">
        <div id="new1_head">
        <img src="/Eventstar/img/book_shezhi.png"> <span>添加新分组</span>
        </div>
        <div id="d3">
            <form action="/Eventstar/book/book_add" method="post" >
            <br>
            <span class="s1">分组名称：</span>
            <input type="text" name="new_bookname" class="inp_bookname" placeholder="必填">
            <br><br>
            <span class="s2">分组简介：</span>
            <input type="text" name="new_bookdesc" class="inp_bookdesc">
            <div id="close"></div>
            <button>添加</button>
            </form>
        </div>
    </div>
</div>
<img src="/Eventstar/img/book_foot.PNG">
</body>
</html>
